if(current_shortcuts == null || current_shortcuts.toString() != user_shortcuts.toString()) //toString() is a bit of a hack but those are not Arrays and thus deepArrayEquals doesn't work
{
//alert("emptying");
$("#qlauncher-shortcut-list", doc).empty();
addShortcuts(user_shortcuts);
current_shortcuts = user_shortcuts;
}
return true;
}
else
{
return false;
}
};
//preload qLauncher for speed
if(is_qlauncher_enabled())
{
if(doc.location.href.indexOf("https://") != 0 && SW_hasShortcuts()) // prevent (or delay) "Connection Partially Encrypted" warnings and do not create qLauncher folder
{
setTimeout(function()
{
setupShortcutList();
}, 2000); //only preload after 2 secs
}
}
/* //do not pre-load -- can cause problems with html and introduce too much load on servers
*/
var getInvokeKey = function()
{
var invoke_key = SW_getCharPref(
"extensions.smarterwiki.qlauncher_invoke_key");
return invoke_key;
};
var matchesInvokeKey = function(event)
{
var keys = getInvokeKey().match(/(META|CTRL|ALT|SHIFT|[^+]+)/g);
(keys.indexOf("META") == -1 || event.metaKey) && //if meta key is specified and there is no meta key -> bad, else OK. This is because ctrl also counts as meta